package com.trkj.dao.wdm;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.BonusAdministration;


public interface BonusAdministrationDAO extends CrudRepository<BonusAdministration, Long>{
	@Query("select b,p,s from BonusAdministration b inner join b.bonusPenaltype p inner join b.staffInformation s ")
	public List<Object[]> queryByNaPage(Pageable p);
	
	@Query("select s,d,p,duty from StaffInformation s inner join"
			+ " s.definitionDept d inner join s.professionalTitle "
			+ "p  inner join s.duty duty inner join s.laborTurnovers sl where sl.voluntaryTurnover = 0")
	public List<Object[]> queryStaffAll(Pageable p);
	@Query("select s,d,p,duty,job from StaffInformation s inner join"
			+ " s.definitionDept d inner join s.professionalTitle "
			+ "p  inner join s.duty duty inner join s.jobStatus job where s.stainId=?1")
	public List<Object[]> LikeStaffOne(Long stainId);
}
